package lt.marsrutai.mobile.android.dao;

import java.util.List;

import lt.marsrutai.mobile.android.dao.annotation.Cache;
import lt.marsrutai.mobile.android.dao.dto.ArrivalTimeDto;
import lt.marsrutai.mobile.android.dao.dto.BusRunDto;
import lt.marsrutai.mobile.android.dao.dto.BusStopDto;
import lt.marsrutai.mobile.android.dao.dto.BusTrackDto;
import lt.marsrutai.mobile.android.dao.dto.DaysOfWeekDto;
import lt.marsrutai.mobile.android.dao.dto.ScheduleDto;
import lt.marsrutai.mobile.android.dao.dto.ScopeInfoDto;
import lt.marsrutai.mobile.android.dao.dto.SearchResultDto;
import lt.marsrutai.mobile.android.dao.dto.StopDayTimesDto;
import lt.marsrutai.mobile.android.dao.dto.TransportDto;
import lt.marsrutai.mobile.android.dao.exception.BackendException;

/**
 * Cache annotations are here, because proxy passes interface method to
 * interceptor, so interceptors only see annotations added to interface.
 *
 * @author Martynas Mickevicius
 *
 */
public interface DataDao {

    @Cache
    public List<ScopeInfoDto> getAvailableMobileScopes() throws BackendException;

    @Cache
    public ScopeInfoDto getScopeInfo(String scopeName) throws BackendException;

    @Cache
    public List<String> getStopNames(String scopeName) throws BackendException;

    @Cache
    public List<BusStopDto> getStops(String scopeName, boolean withSchedules, String searchQuery, Double lat, Double lng, Double distance) throws BackendException;

    @Cache
    public BusStopDto getStopById(String scopeName, String stopId) throws BackendException;

    @Cache
    public List<ArrivalTimeDto> getArrivalTimes(String scopeName, String stopId, String stopGroupName, int maxMinutes, int maxResults, String time)
            throws BackendException;

    @Cache
    public List<ScheduleDto> getSchedules(String scopeName, String transport) throws BackendException;

    @Cache
    public ScheduleDto getScheduleById(String scopeName, String scheduleId) throws BackendException;

    @Cache
    public List<BusTrackDto> getTracks(String scopeName, String scheduleId) throws BackendException;

    @Cache
    public BusTrackDto getTrackById(String scopeName, String trackId) throws BackendException;

    @Cache
    public List<BusStopDto> getTrackStops(String scopeName, String trackId) throws BackendException;

    @Cache
    public List<DaysOfWeekDto> getDifferentRunningDays(String scopeName, String scheduleId) throws BackendException;

    @Cache
    public List<ArrivalTimeDto> getStopTimes(String scopeName, String trackId, String stopId, int day) throws BackendException;

    @Cache
    public List<StopDayTimesDto> getStopDayTimes(String scopeName, String trackId, String stopId) throws BackendException;

    @Cache
    public BusRunDto getRunById(String scopeName, String runId) throws BackendException;

    public SearchResultDto findRoutes(String scopeName, String start, String end, String time, boolean isArrival) throws BackendException;

    @Cache
    public List<TransportDto> getTransports(String scopeName);
}
